import type { ResultType } from './types';

export const parseJson = (json: string) => {
	let result: ResultType = {};
	if (json) {
		try {
			result = JSON.parse(json);
		} catch (err) { }
	}
	return result;
}